/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entityprojet;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Ron
 */
@Entity
@Table(name = "F_DEPOT")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FDepot.findAll", query = "SELECT f FROM FDepot f"),
    @NamedQuery(name = "FDepot.findByDENo", query = "SELECT f FROM FDepot f WHERE f.dENo = :dENo"),
    @NamedQuery(name = "FDepot.findByDEIntitule", query = "SELECT f FROM FDepot f WHERE f.dEIntitule = :dEIntitule"),
    @NamedQuery(name = "FDepot.findByDEAdresse", query = "SELECT f FROM FDepot f WHERE f.dEAdresse = :dEAdresse"),
    @NamedQuery(name = "FDepot.findByDEComplement", query = "SELECT f FROM FDepot f WHERE f.dEComplement = :dEComplement"),
    @NamedQuery(name = "FDepot.findByDECodePostal", query = "SELECT f FROM FDepot f WHERE f.dECodePostal = :dECodePostal"),
    @NamedQuery(name = "FDepot.findByDEVille", query = "SELECT f FROM FDepot f WHERE f.dEVille = :dEVille"),
    @NamedQuery(name = "FDepot.findByDEContact", query = "SELECT f FROM FDepot f WHERE f.dEContact = :dEContact"),
    @NamedQuery(name = "FDepot.findByDEPrincipal", query = "SELECT f FROM FDepot f WHERE f.dEPrincipal = :dEPrincipal"),
    @NamedQuery(name = "FDepot.findByDECatCompta", query = "SELECT f FROM FDepot f WHERE f.dECatCompta = :dECatCompta"),
    @NamedQuery(name = "FDepot.findByDERegion", query = "SELECT f FROM FDepot f WHERE f.dERegion = :dERegion"),
    @NamedQuery(name = "FDepot.findByDEPays", query = "SELECT f FROM FDepot f WHERE f.dEPays = :dEPays"),
    @NamedQuery(name = "FDepot.findByDEEMail", query = "SELECT f FROM FDepot f WHERE f.dEEMail = :dEEMail"),
    @NamedQuery(name = "FDepot.findByDECode", query = "SELECT f FROM FDepot f WHERE f.dECode = :dECode"),
    @NamedQuery(name = "FDepot.findByDETelephone", query = "SELECT f FROM FDepot f WHERE f.dETelephone = :dETelephone"),
    @NamedQuery(name = "FDepot.findByDETelecopie", query = "SELECT f FROM FDepot f WHERE f.dETelecopie = :dETelecopie"),
    @NamedQuery(name = "FDepot.findByDEReplication", query = "SELECT f FROM FDepot f WHERE f.dEReplication = :dEReplication"),
    @NamedQuery(name = "FDepot.findByDPNoDefaut", query = "SELECT f FROM FDepot f WHERE f.dPNoDefaut = :dPNoDefaut"),
    @NamedQuery(name = "FDepot.findByCbProt", query = "SELECT f FROM FDepot f WHERE f.cbProt = :cbProt"),
    @NamedQuery(name = "FDepot.findByCbMarq", query = "SELECT f FROM FDepot f WHERE f.cbMarq = :cbMarq"),
    @NamedQuery(name = "FDepot.findByCbCreateur", query = "SELECT f FROM FDepot f WHERE f.cbCreateur = :cbCreateur"),
    @NamedQuery(name = "FDepot.findByCbModification", query = "SELECT f FROM FDepot f WHERE f.cbModification = :cbModification"),
    @NamedQuery(name = "FDepot.findByCbReplication", query = "SELECT f FROM FDepot f WHERE f.cbReplication = :cbReplication"),
    @NamedQuery(name = "FDepot.findByCbFlag", query = "SELECT f FROM FDepot f WHERE f.cbFlag = :cbFlag")})
public class FDepot implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "DE_No")
    private Integer dENo;
    @Basic(optional = false)
    @Column(name = "DE_Intitule")
    private String dEIntitule;
    @Lob
    @Column(name = "cbDE_Intitule")
    private byte[] cbDEIntitule;
    @Column(name = "DE_Adresse")
    private String dEAdresse;
    @Column(name = "DE_Complement")
    private String dEComplement;
    @Column(name = "DE_CodePostal")
    private String dECodePostal;
    @Column(name = "DE_Ville")
    private String dEVille;
    @Column(name = "DE_Contact")
    private String dEContact;
    @Column(name = "DE_Principal")
    private Short dEPrincipal;
    @Column(name = "DE_CatCompta")
    private Short dECatCompta;
    @Column(name = "DE_Region")
    private String dERegion;
    @Column(name = "DE_Pays")
    private String dEPays;
    @Column(name = "DE_EMail")
    private String dEEMail;
    @Column(name = "DE_Code")
    private String dECode;
    @Lob
    @Column(name = "cbDE_Code")
    private byte[] cbDECode;
    @Column(name = "DE_Telephone")
    private String dETelephone;
    @Column(name = "DE_Telecopie")
    private String dETelecopie;
    @Column(name = "DE_Replication")
    private Integer dEReplication;
    @Column(name = "DP_NoDefaut")
    private Integer dPNoDefaut;
    @Column(name = "cbProt")
    private Short cbProt;
    @Id
    @Basic(optional = false)
    @Column(name = "cbMarq")
    private Integer cbMarq;
    @Column(name = "cbCreateur")
    private String cbCreateur;
    @Column(name = "cbModification")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cbModification;
    @Column(name = "cbReplication")
    private Integer cbReplication;
    @Column(name = "cbFlag")
    private Short cbFlag;
    @OneToMany(mappedBy = "cbDENo")
    private Collection<FComptet> fComptetCollection;
    @OneToMany(mappedBy = "cbDENo")
    private Collection<FDocentete> fDocenteteCollection;
    @JoinColumn(name = "cbDP_NoDefaut", referencedColumnName = "DP_No")
    @ManyToOne
    private FDepotempl cbDPNoDefaut;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "dENo")
    private Collection<FDepotempl> fDepotemplCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "dENo")
    private Collection<FRessourceprod> fRessourceprodCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "dENo")
    private Collection<FCaisse> fCaisseCollection;
    @OneToMany(mappedBy = "cbDENo")
    private Collection<FDocligne> fDocligneCollection;

    public FDepot() {
    }

    public FDepot(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public FDepot(Integer cbMarq, String dEIntitule) {
        this.cbMarq = cbMarq;
        this.dEIntitule = dEIntitule;
    }

    public Integer getDENo() {
        return dENo;
    }

    public void setDENo(Integer dENo) {
        this.dENo = dENo;
    }

    public String getDEIntitule() {
        return dEIntitule;
    }

    public void setDEIntitule(String dEIntitule) {
        this.dEIntitule = dEIntitule;
    }

    public byte[] getCbDEIntitule() {
        return cbDEIntitule;
    }

    public void setCbDEIntitule(byte[] cbDEIntitule) {
        this.cbDEIntitule = cbDEIntitule;
    }

    public String getDEAdresse() {
        return dEAdresse;
    }

    public void setDEAdresse(String dEAdresse) {
        this.dEAdresse = dEAdresse;
    }

    public String getDEComplement() {
        return dEComplement;
    }

    public void setDEComplement(String dEComplement) {
        this.dEComplement = dEComplement;
    }

    public String getDECodePostal() {
        return dECodePostal;
    }

    public void setDECodePostal(String dECodePostal) {
        this.dECodePostal = dECodePostal;
    }

    public String getDEVille() {
        return dEVille;
    }

    public void setDEVille(String dEVille) {
        this.dEVille = dEVille;
    }

    public String getDEContact() {
        return dEContact;
    }

    public void setDEContact(String dEContact) {
        this.dEContact = dEContact;
    }

    public Short getDEPrincipal() {
        return dEPrincipal;
    }

    public void setDEPrincipal(Short dEPrincipal) {
        this.dEPrincipal = dEPrincipal;
    }

    public Short getDECatCompta() {
        return dECatCompta;
    }

    public void setDECatCompta(Short dECatCompta) {
        this.dECatCompta = dECatCompta;
    }

    public String getDERegion() {
        return dERegion;
    }

    public void setDERegion(String dERegion) {
        this.dERegion = dERegion;
    }

    public String getDEPays() {
        return dEPays;
    }

    public void setDEPays(String dEPays) {
        this.dEPays = dEPays;
    }

    public String getDEEMail() {
        return dEEMail;
    }

    public void setDEEMail(String dEEMail) {
        this.dEEMail = dEEMail;
    }

    public String getDECode() {
        return dECode;
    }

    public void setDECode(String dECode) {
        this.dECode = dECode;
    }

    public byte[] getCbDECode() {
        return cbDECode;
    }

    public void setCbDECode(byte[] cbDECode) {
        this.cbDECode = cbDECode;
    }

    public String getDETelephone() {
        return dETelephone;
    }

    public void setDETelephone(String dETelephone) {
        this.dETelephone = dETelephone;
    }

    public String getDETelecopie() {
        return dETelecopie;
    }

    public void setDETelecopie(String dETelecopie) {
        this.dETelecopie = dETelecopie;
    }

    public Integer getDEReplication() {
        return dEReplication;
    }

    public void setDEReplication(Integer dEReplication) {
        this.dEReplication = dEReplication;
    }

    public Integer getDPNoDefaut() {
        return dPNoDefaut;
    }

    public void setDPNoDefaut(Integer dPNoDefaut) {
        this.dPNoDefaut = dPNoDefaut;
    }

    public Short getCbProt() {
        return cbProt;
    }

    public void setCbProt(Short cbProt) {
        this.cbProt = cbProt;
    }

    public Integer getCbMarq() {
        return cbMarq;
    }

    public void setCbMarq(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public String getCbCreateur() {
        return cbCreateur;
    }

    public void setCbCreateur(String cbCreateur) {
        this.cbCreateur = cbCreateur;
    }

    public Date getCbModification() {
        return cbModification;
    }

    public void setCbModification(Date cbModification) {
        this.cbModification = cbModification;
    }

    public Integer getCbReplication() {
        return cbReplication;
    }

    public void setCbReplication(Integer cbReplication) {
        this.cbReplication = cbReplication;
    }

    public Short getCbFlag() {
        return cbFlag;
    }

    public void setCbFlag(Short cbFlag) {
        this.cbFlag = cbFlag;
    }

    @XmlTransient
    public Collection<FComptet> getFComptetCollection() {
        return fComptetCollection;
    }

    public void setFComptetCollection(Collection<FComptet> fComptetCollection) {
        this.fComptetCollection = fComptetCollection;
    }

    @XmlTransient
    public Collection<FDocentete> getFDocenteteCollection() {
        return fDocenteteCollection;
    }

    public void setFDocenteteCollection(Collection<FDocentete> fDocenteteCollection) {
        this.fDocenteteCollection = fDocenteteCollection;
    }

    public FDepotempl getCbDPNoDefaut() {
        return cbDPNoDefaut;
    }

    public void setCbDPNoDefaut(FDepotempl cbDPNoDefaut) {
        this.cbDPNoDefaut = cbDPNoDefaut;
    }

    @XmlTransient
    public Collection<FDepotempl> getFDepotemplCollection() {
        return fDepotemplCollection;
    }

    public void setFDepotemplCollection(Collection<FDepotempl> fDepotemplCollection) {
        this.fDepotemplCollection = fDepotemplCollection;
    }

    @XmlTransient
    public Collection<FRessourceprod> getFRessourceprodCollection() {
        return fRessourceprodCollection;
    }

    public void setFRessourceprodCollection(Collection<FRessourceprod> fRessourceprodCollection) {
        this.fRessourceprodCollection = fRessourceprodCollection;
    }

    @XmlTransient
    public Collection<FCaisse> getFCaisseCollection() {
        return fCaisseCollection;
    }

    public void setFCaisseCollection(Collection<FCaisse> fCaisseCollection) {
        this.fCaisseCollection = fCaisseCollection;
    }

    @XmlTransient
    public Collection<FDocligne> getFDocligneCollection() {
        return fDocligneCollection;
    }

    public void setFDocligneCollection(Collection<FDocligne> fDocligneCollection) {
        this.fDocligneCollection = fDocligneCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cbMarq != null ? cbMarq.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FDepot)) {
            return false;
        }
        FDepot other = (FDepot) object;
        if ((this.cbMarq == null && other.cbMarq != null) || (this.cbMarq != null && !this.cbMarq.equals(other.cbMarq))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityprojet.FDepot[ cbMarq=" + cbMarq + " ]";
    }
    
}
